import {defineStore} from "pinia";
import {ref} from "vue";
import {UserInfoType} from "../types/types.ts";

export const useUserStore = defineStore("user", ()=>{

    const userInfo = ref<UserInfoType>({});
    const toUserAccount = ref<string>('');
    return { userInfo,toUserAccount};
},{
    persist: [
        {
            storage: localStorage,
            key: "user",
        }
    ],
})